macro drop _all
set more off

global path  "WRITE YOUR PATH HERE" 
global working_data="${path}"+"/"+"Replication_code_RFS"+"/"+"Pseudo_data/"
global results="${path}/Replication_code_RFS/Results/"

******************************** TABLES ****************************************

global table_spec cells("b(fmt(3) star)" "t(fmt(2) par)") style(tex) varlabels(_cons \_cons) stats(r2_a N, labels("R-Square adj")) star(* 0.10 ** 0.05 *** 0.01) label 

***
***	TABLE 1: SUMMARY STATS
***
	
use "${working_data}Table1_VICboot.dta", clear
tabstat contract_price_win ToM_first_win rp_bedrooms rp_bathrooms rp_car_spaces rp_swimming_pool , statistics(mean median sd)  save
tabstatmat temp
matrix temp = temp'
matrix ALL = temp
logout, save("${results}Table_1_VIC.tex") dec(2) tex replace: mat li ALL, noheader 
gen temp=_N
gegen temp_2=total(Dummy_House)
gen Fract_House_Full=temp_2/temp
drop temp*
gen temp=_N
gegen temp_2=total(Dummy_Auction)
gen Fract_Auction_Full=temp_2/temp
drop temp*
tabstat Fract_*, statistics(mean)  save
tabstatmat temp
matrix temp = temp'
logout, save("${results}Table_1_VIC_Fract.tex") dec(2) tex replace: mat li temp, noheader

use "${working_data}Table1_NSWboot.dta", clear
tabstat contract_price_win ToM_first_win rp_bedrooms rp_bathrooms rp_car_spaces rp_swimming_pool , statistics(mean median sd )  save
tabstatmat temp
matrix temp = temp'
matrix ALL = temp
logout, save("${results}Table_1_NSW.tex") dec(2) tex replace: mat li ALL, noheader 
gen temp=_N
gegen temp_2=total(Dummy_House)
gen Fract_House_Full=temp_2/temp
drop temp*
gen temp=_N
gegen temp_2=total(Dummy_Auction)
gen Fract_Auction_Full=temp_2/temp
drop temp*
tabstat Fract_*, statistics(mean)  save
tabstatmat temp
matrix temp = temp'
logout, save("${results}Table_1_NSW_Fract.tex") dec(2) tex replace: mat li temp, noheader

***
***	TABLE 2 Panel A
***
	
use	 "${working_data}Table2A_VICboot.dta", clear
ttest log_First_Match_A==log_First_Match_N if str_Pre_Post=="Before", unpaired unequal
ttest log_First_Match_A==log_First_Match_N if str_Pre_Post=="After", unpaired unequal
tabstat log_First_Match_A log_First_Match_N  if str_Pre_Post=="Before", statistics(mean median)  save
tabstatmat temp
matrix temp = temp'
matrix ALL = temp
logout, save("${results}Table_2_PanelA_VIC.tex") dec(2) tex replace: mat li ALL, noheader 

use	 "${working_data}Table2A_NSWboot.dta", clear
ttest log_First_Match_A==log_First_Match_N if str_Pre_Post=="Before", unpaired unequal
ttest log_First_Match_A==log_First_Match_N if str_Pre_Post=="After", unpaired unequal
tabstat log_First_Match_A log_First_Match_N  if str_Pre_Post=="Before", statistics(mean median)  save
tabstatmat temp
matrix temp = temp'
matrix ALL = temp
logout, save("${results}Table_2_PanelA_NSW.tex") dec(2) tex replace: mat li ALL, noheader 

***
***	TABLE 2 Panel B
***
	
use	 "${working_data}Table2B_VICboot.dta", clear	
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first  Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelB_VIC.tex", $table_spec replace	

use	 "${working_data}Table2B_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first  Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelB_NSW.tex", $table_spec replace	

***
***	TABLE 2 Panel C
***
	
use "${working_data}Table2C_VICboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first  Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelC_VIC.tex", $table_spec replace	

use "${working_data}Table2C_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first  Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelC_NSW.tex", $table_spec replace	

***
***	TABLE 2 Panel D
***

use	 "${working_data}Table2D_VICboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first_time_trend  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first_time_trend  Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelD_VIC.tex", $table_spec replace	


use "${working_data}Table2D_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

eststo clear
eststo: reghdfe log_p_d_first_time_trend  Auction                           , absorb(postcode yyyymm00) vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_d_first_time_trend Auction                    $Xctrl , absorb(postcode yyyymm00) vce(clusterpostcode yyyymm00)		
esttab using "${results}Table_2_PanelD_NSW.tex", $table_spec replace	


***
***	TABLE 3 
***

use "${working_data}Table3_VICboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

gen Bed_3more=rp_bedrooms>=3    
replace Bed_3more=. if rp_bedrooms==.
gen Bath_3more=rp_bathrooms>=3
replace Bath_3more=. if rp_bathrooms==.
gen Car_3more=rp_car_spaces>=3
replace Car_3more=. if rp_car_spaces==.
gen Size_large=log_rp_listing_area>6
replace Size_large=. if log_rp_listing_area==.
global Char Bed_3more Bath_3more Car_3more Size_large rp_swimming_pool unit_dummy	

eststo clear	
eststo: reghdfe Auction $Char  			       , noabsorb vce(cluster postcode yyyymm00)
eststo: reghdfe Auction $Char   log_AvgPrc     , noabsorb vce(cluster postcode yyyymm00)
eststo: reghdfe Auction $Char                  , absorb(postcode) vce(cluster postcode yyyymm00)
esttab using "${results}Table_3_VIC.tex", $table_spec replace

use "${working_data}Table3_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size

gen Bed_3more=rp_bedrooms>=3    
replace Bed_3more=. if rp_bedrooms==.
gen Bath_3more=rp_bathrooms>=3
replace Bath_3more=. if rp_bathrooms==.
gen Car_3more=rp_car_spaces>=3
replace Car_3more=. if rp_car_spaces==.
gen Size_large=log_rp_listing_area>6
replace Size_large=. if log_rp_listing_area==.
global Char Bed_3more Bath_3more Car_3more Size_large rp_swimming_pool unit_dummy	

eststo clear	
eststo: reghdfe Auction $Char  			       , noabsorb vce(cluster postcode yyyymm00)
eststo: reghdfe Auction $Char   log_AvgPrc     , noabsorb vce(cluster postcode yyyymm00)
eststo: reghdfe Auction $Char                  , absorb(postcode) vce(cluster postcode yyyymm00)
esttab using "${results}Table_3_NSW.tex", $table_spec replace


***
***	TABLE 4
***

use "${working_data}Table4_VICboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size 

eststo clear
eststo: reghdfe log_p_d_first  I_REFORM   I_POST     I_REFORM_POST $Xctrl, noabsorb               vce(clusterpostcode yyyymm00)		
eststo: reghdfe log_p_d_first  I_REFORM              I_REFORM_POST $Xctrl, absorb(yyyymm00)  vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_d_first             I_POST     I_REFORM_POST $Xctrl, absorb(postcode)        vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_d_first  		               I_REFORM_POST $Xctrl, absorb(postcode yyyymm00)  vce(cluster postcode yyyymm00)	
esttab using "${results}Table_4_VIC.tex", $table_spec replace
	
use "${working_data}Table4_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size 

eststo clear
eststo: reghdfe log_p_d_first  I_REFORM   I_POST     I_REFORM_POST $Xctrl, noabsorb               vce(clusterpostcode yyyymm00)		
eststo: reghdfe log_p_d_first  I_REFORM              I_REFORM_POST $Xctrl, absorb(yyyymm00)  vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_d_first             I_POST     I_REFORM_POST $Xctrl, absorb(postcode)        vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_d_first  		               I_REFORM_POST $Xctrl, absorb(postcode yyyymm00)  vce(cluster postcode yyyymm00)	
esttab using "${results}Table_4_NSW.tex", $table_spec replace

***
***	TABLE 5 
***

use "${working_data}Table5boot.dta", clear
gen bed_dummy_1    = Bedrooms == 1
gen bed_dummy_3    = Bedrooms == 3
gen bed_dummy_4g   = Bedrooms >= 4
gen bath_dummy_1   = Bathrooms == 1
gen bath_dummy_3g  = Bathrooms >= 3  
gen park_dummy_0   = Parking == 0
gen park_dummy_1   = Parking == 1
gen park_dummy_3g  = Parking > 2
gen unit_dummy     = PropertyType == "ApartmentUnitFlat"
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy 

eststo clear
eststo: reghdfe  ln_NBelow   Dummy_Post $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)						
eststo: reghdfe  Dummy_below   Dummy_Post $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)						
eststo: reghdfe  Reserve_min_Entry   Dummy_Post $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)						
esttab using "${results}Table_5.tex", $table_spec replace	

***
***	TABLE 6
***

use "${working_data}Table6_VICboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)
global Xctrl bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size  log_p_first

eststo clear
eststo: reghdfe log_p_sale  I_REFORM   I_POST     I_REFORM_POST $Xctrl, noabsorb               vce(clusterpostcode yyyymm00)		
eststo: reghdfe log_p_sale  I_REFORM              I_REFORM_POST $Xctrl, absorb(yyyymm00)  vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale             I_POST     I_REFORM_POST $Xctrl, absorb(postcode)        vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale  		               I_REFORM_POST $Xctrl, absorb(postcode yyyymm00)  vce(cluster postcode yyyymm00)	
esttab using "${results}Table_6_VIC.tex", $table_spec replace

use "${working_data}Table6_NSWboot.dta", clear
gen bed_dummy_1    = rp_bedrooms == 1
gen bed_dummy_3    = rp_bedrooms == 3
gen bed_dummy_4g   = rp_bedrooms >= 4
gen bath_dummy_1   = rp_bathrooms == 1
gen bath_dummy_3g  = rp_bathrooms >= 3  
gen park_dummy_1   = rp_car_spaces == 1
gen park_dummy_3g  = rp_car_spaces > 2
gen unit_dummy     = property_type == "Flats" | property_type == "Unit"
gen pool_dummy     = rp_swimming_pool>0
gen log_size       = log(rp_listing_area)

global Xctrl bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size  log_p_first
eststo clear
eststo: reghdfe log_p_sale  I_REFORM   I_POST     I_REFORM_POST $Xctrl, noabsorb               vce(clusterpostcode yyyymm00)		
eststo: reghdfe log_p_sale  I_REFORM              I_REFORM_POST $Xctrl, absorb(yyyymm00)  vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale             I_POST     I_REFORM_POST $Xctrl, absorb(postcode)        vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale  		               I_REFORM_POST $Xctrl, absorb(postcode yyyymm00)  vce(cluster postcode yyyymm00)	
esttab using "${results}Table_6_NSW_PanelB.tex", $table_spec replace

drop if yyyymm00>=20150900 & yyyymm00<20160100
eststo clear
eststo: reghdfe log_p_sale  I_REFORM   I_POST     I_REFORM_POST $Xctrl , noabsorb               vce(cluster postcode yyyymm00)		
eststo: reghdfe log_p_sale  I_REFORM              I_REFORM_POST $Xctrl , absorb(yyyymm00)  vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale             I_POST     I_REFORM_POST $Xctrl , absorb(postcode)        vce(cluster postcode yyyymm00)	
eststo: reghdfe log_p_sale  		               I_REFORM_POST $Xctrl , absorb(postcode yyyymm00)  vce(cluster postcode yyyymm00)	
esttab using "${results}Table_6_NSW_PanelC.tex", $table_spec replace
			
***
*** Table 7
***

use "${working_data}Table_7_VIC_boot.dta", clear
eststo clear		
eststo: reghdfe Unsuccessful I_REFORM_POST_VIC I_POST_VIC I_REFORM_VIC  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , noabsorb  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_VIC            I_REFORM_VIC  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(ym_date)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_VIC I_POST_VIC               bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_VIC                          bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode ym_date)  vce(cluster postcode ym_date)
esttab using "${results}Table_7_VIC.tex", $table_spec replace
	

use "${working_data}Table_7_NSW_boot.dta", clear
eststo clear		
eststo: reghdfe Unsuccessful I_REFORM_POST_NSW I_POST_NSW I_REFORM_NSW  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , noabsorb  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_NSW           I_REFORM_NSW  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(ym_date)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_NSW I_POST_NSW              bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful  I_REFORM_POST_NSW                        bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode ym_date)  vce(cluster postcode ym_date)
esttab using "${results}Table_7_NSW_PanelB.tex", $table_spec replace

eststo clear
drop if date_first_advertise>=td(01sep2015) & date_first_advertise<=td(31dec2015) 
eststo: reghdfe Unsuccessful I_REFORM_POST_NSW I_POST_NSW I_REFORM_NSW  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , noabsorb  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful I_REFORM_POST_NSW            I_REFORM_NSW  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv, absorb(ym_date)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful I_REFORM_POST_NSW I_POST_NSW               bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode)  vce(cluster postcode ym_date)
eststo: reghdfe Unsuccessful I_REFORM_POST_NSW                          bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv , absorb(postcode ym_date)  vce(cluster postcode ym_date)
esttab using "${results}Table_7_NSW_PanelC.tex", $table_spec replace
			
***
***	TABLE 9 
***

use "${working_data}Table_9_boot.dta", clear
gen bed_dummy_1    = Bedrooms == 1
gen bed_dummy_3    = Bedrooms == 3
gen bed_dummy_4g   = Bedrooms >= 4
gen bath_dummy_1   = Bathrooms == 1
gen bath_dummy_3g  = Bathrooms >= 3  
gen park_dummy_0   = Parking == 0
gen park_dummy_1   = Parking == 1
gen park_dummy_3g  = Parking > 2
gen unit_dummy     = PropertyType == "ApartmentUnitFlat"
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy 

eststo clear
eststo: reghdfe ln_N_Jump_10000 Reserve_min_Entry   $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_N_Jump_25000 Reserve_min_Entry  $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_N_Jump_025pc Reserve_min_Entry  $Xctrl , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_Mean_Delta_t Reserve_min_Entry $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_Sale ln_N_Jump_10000   $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_Sale ln_N_Jump_25000 $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_Sale ln_N_Jump_025pc  $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
eststo: reghdfe ln_Sale ln_Mean_Delta_t   $Xctrl  , absorb(Suburb) vce(cluster Suburb yyyymm)
esttab using "${results}Table_9.tex", $table_spec replace

***
***	TABLE 10
***

use "${working_data}Table_10_boot.dta", clear
gen bed_dummy_1    = bedrooms == 1
gen bed_dummy_3    = bedrooms == 3
gen bed_dummy_4g   = bedrooms >= 4
gen bath_dummy_1   = bathrooms == 1
gen bath_dummy_3g  = bathrooms >= 3  
gen park_dummy_1   = carspot == 1
gen park_dummy_3g  = carspot > 2
gen log_size       = log(size)
global Xctrl  bed_dummy_* bath_dummy_* park_dummy_*  log_size 

eststo clear
eststo: reghdfe  Arousal Market_minus_first  $Xctrl, absorb(postcode yyyymm) vce(cluster postcode yyyymm)
eststo: reghdfe  Valence Market_minus_first  $Xctrl, absorb(postcode yyyymm) vce(cluster postcode yyyymm)
eststo: reghdfe ln_Attendees Market_minus_first $Xctrl , absorb(postcode yyyymm) vce(cluster postcode yyyymm)	
eststo: reghdfe ln_Bidders Market_minus_first  $Xctrl , absorb(postcode yyyymm) vce(cluster postcode yyyymm)	
esttab using "${results}Table_10.tex", $table_spec replace


******************************** FIGURES ****************************************

***
***	FIGURE 1
***

use "${working_data}Figure1_VIC_PanelA_boot.dta", clear
reghdfe q   Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3  ///
Auction  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size	, absorb(postcode) vce(cluster postcode yyyymm)
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
	lincom _b[`v']
	local i = `i' + 1
	matrix C[`i',1] = `r(estimate)'
	matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
	matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
	global temp_avg_pre=$temp_avg_pre + _b[`v']
	}
	global temp_avg_pre=${temp_avg_pre}/3
global temp_avg_post 0
foreach v of varlist $cycle_plus {
	lincom _b[`v']
	local i = `i' + 1
	matrix C[`i',1] = `r(estimate)'
	matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
	matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
	global temp_avg_post=$temp_avg_post + _b[`v']
	}
	global temp_avg_post=${temp_avg_post}/4
	display $temp_avg_pre
	display $temp_avg_post
coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_size)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_VIC_PanelA.png", replace
			 
use "${working_data}Figure1_VIC_PanelB_boot.dta", clear
reghdfe log_p_sale    Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3 ///
Auction  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_p_first log_size	, absorb(postcode) vce(cluster postcode yyyymm)
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
	lincom _b[`v']
	local i = `i' + 1
	matrix C[`i',1] = `r(estimate)'
	matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
	matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
	global temp_avg_pre=$temp_avg_pre + _b[`v']
	}
	global temp_avg_pre=${temp_avg_pre}/3
global temp_avg_post 0
foreach v of varlist $cycle_plus {
	lincom _b[`v']
	local i = `i' + 1
	matrix C[`i',1] = `r(estimate)'
	matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
	matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
	global temp_avg_post=$temp_avg_post + _b[`v']
	}
	global temp_avg_post=${temp_avg_post}/4
	display $temp_avg_pre
	display $temp_avg_post

coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_p_first log_size)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_VIC_PanelB.png", replace			
			
use "${working_data}Figure1_VIC_PanelC_boot.dta", clear
reghdfe Unsuccessful Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3 ///
 Auction bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv, absorb(postcode) vce(cluster postcode yyyymm)
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2	 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_pre=$temp_avg_pre + _b[`v']
}
global temp_avg_pre=${temp_avg_pre}/3
global temp_avg_post 0
foreach v of varlist $cycle_plus {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_post=$temp_avg_post + _b[`v']
}
global temp_avg_post=${temp_avg_post}/4
display $temp_avg_pre
display $temp_avg_post
coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_VIC_PanelC.png", replace
	
use "${working_data}Figure1_NSW_PanelA_boot.dta", clear	
reghdfe q  Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3 ///
Auction bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy  log_size, absorb(postcode) vce(cluster  postcode yyyymm)
global Label 1 "Q-4" 2 "Q-3" 3 "Q-2" 4 "Q" 5 "Q+1" 6 "Q+2" 7 "Q+3"
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_pre=$temp_avg_pre + _b[`v']
}
global temp_avg_pre=${temp_avg_pre}/3
global temp_avg_post 0
foreach v of varlist $cycle_plus {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_post=$temp_avg_post + _b[`v']
}
global temp_avg_post=${temp_avg_post}/4
display $temp_avg_pre
display $temp_avg_post
coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy  log_size)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_NSW_PanelA.png", replace		
				
use "${working_data}Figure1_NSW_PanelB_boot.dta", clear		
reghdfe log_p_sale Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3 ///
Auction bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_p_first log_size, absorb(postcode) vce(cluster  postcode yyyymm)
global ToKeep Auction_Q_201501 Auction_Q_201504 Auction_Q_201507 Auction_Q_201601 Auction_Q_201604 Auction_Q_201607 Auction_Q_201612 
global Label 1 "Q-4" 2 "Q-3" 3 "Q-2" 4 "Q" 5 "Q+1" 6 "Q+2" 7 "Q+3"
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_pre=$temp_avg_pre + _b[`v']
}
global temp_avg_pre=${temp_avg_pre}/3

global temp_avg_post 0
foreach v of varlist $cycle_plus {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_post=$temp_avg_post + _b[`v']
}
global temp_avg_post=${temp_avg_post}/4
display $temp_avg_pre
display $temp_avg_post

coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_* bath_dummy_* park_dummy_* unit_dummy pool_dummy log_p_first log_size)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_NSW_PanelB.png", replace		
		
use "${working_data}Figure1_NSW_PanelC_boot.dta", clear
reghdfe Unsuccessful Qm4 Qm3 Qm2 Q Qp1 Qp2 Qp3 Auction_Qm4 Auction_Qm3  Auction_Qm2	Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3 ///
 Auction bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv, absorb(postcode) vce(cluster postcode yyyymm)
global cycle_min   Auction_Qm4 Auction_Qm3  Auction_Qm2 Auction
global cycle_plus  Auction_Q Auction_Qp1 Auction_Qp2 Auction_Qp3
mat C=J(8,3,.)	
local i 0
global temp_avg_pre 0
foreach v of varlist $cycle_min {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_pre=$temp_avg_pre + _b[`v']
}
global temp_avg_pre=${temp_avg_pre}/3

global temp_avg_post 0
foreach v of varlist $cycle_plus {
lincom _b[`v']
local i = `i' + 1
matrix C[`i',1] = `r(estimate)'
matrix C[`i',2] = `r(estimate)'-1.96*`r(se)'
matrix C[`i',3] = `r(estimate)'+1.96*`r(se)'
global temp_avg_post=$temp_avg_post + _b[`v']
}
global temp_avg_post=${temp_avg_post}/4
display $temp_avg_pre
display $temp_avg_post

coefplot (matrix(C[,1]), ci((C[,2] C[,3]))  mcolor(navy)), ///
vertical drop(_cons  bed_dummy_1 bed_dummy_3 bed_dummy_4g bath_dummy_1 bath_dummy_3g park_dummy_1 park_dummy_3g unit_dummy pool_dummy log_size ln_firstadv)  xlabel(,labsize(small) angle(45)) title(, size(normal))  ///
coeflabel(r1="Q-4" r2="Q-3" r3="Q-2" r4="Q-1" r5="Q" r6="Q+1" r7="Q+2" r8="Q+3" r9="Q+4")  ///
xlabel(,labsize(small)) ciopts(recast(rcap) color(navy)) graphregion(fcolor(white)) graphregion(lcolor(white)) 
graph export "${results}Figure_1_NSW_PanelC.png", replace

		
***
***	FIGURE 10
***

use "${working_data}Figue10_boot", clear
drop if Auctions_Attended=="0"
keep  Bidders_soph1 Bid_above_1 Bidders_incvaluatio Attracting_low 
foreach var of varlist Bidders_soph1 Bid_above_1{
		replace `var'="1" if `var'=="Very Rarely"
		replace `var'="2" if `var'=="Rarely"
		replace `var'="3" if `var'=="Sometimes"
		replace `var'="4" if `var'=="Often"
		replace `var'="5" if `var'=="Very Often"
		destring `var', replace force
	}

gen Attracting_low2=substr(Attracting_low,1,8)
replace Attracting_low2="Do Not Know" if Attracting_low2=="Do not k"
replace Attracting_low2="Other" if Attracting_low2=="Other (s"
replace Attracting_low2="Useful" if Attracting_low2=="Useful, "
replace Attracting_low2="Useless" if Attracting_low2=="Useless,"
save "${working_data}temp",replace

global Options graphregion(fcolor(white)) graphregion(lcolor(white))   yscale(range(0(10)49)) ytitle("") blabel(bar, position(outside) gap(.01in) format(%9.2f))
summ Bidders_soph1
global mu=`r(mean)'
signrank Bidders_soph1 = 3 
global pval=`r(p)'
keep Bidders_soph1
keep if Bidders_soph1!=.
bysort Bidders_soph1: gen Frac=_N
gen Tot=_N
replace Frac=Frac/Tot
insobs 1
replace Bidders_soph1=1 if _n==_N
replace Frac=0 if _n==_N
replace Frac=Frac*100
gduplicates drop Bidders_soph1, force
graph bar Frac, over(Bidders_soph1, relabel(1 "Very Rarely" 2 "Rarely"  3 "Sometimes" 4 "Often" 5 "Very Often")  label(labsize(small))) bar(1,fcolor(blue)) allcategories   $Options title("Do bidders attend auctions if they" "think that bidding wars are likely?  ",size(normal)) name(Fig1, replace) text(30 15 "Avg:`:display%9.3f $mu'",size(small)) text(27 15 "Pval:`:display%9.3f $pval'",size(small))
	   
use "${working_data}temp", clear
summ Bid_above_1 
global mu=`r(mean)'
signrank Bid_above_1  = 3 
global pval=`r(p)'
keep if Bid_above_1!=.
bysort Bid_above_1: gen Frac=_N
gen Tot=_N
replace Frac=Frac/Tot
insobs 1
replace Bid_above_1=1 if _n==_N
replace Frac=0 if _n==_N
replace Frac=Frac*100
gduplicates drop Bid_above_1, force
graph bar Frac, over(Bid_above_1,  relabel(1 "Very Rarely" 2 "Rarely"  3 "Sometimes" 4 "Often" 5 "Very Often") label(labsize(small))) $Options title("Do bidders bid above a valuation" "that they determine before the auction?",size(normal)) bar(1,fcolor(blue)) name(Fig2, replace) text(30 15 "Avg:`:display%9.3f $mu'",size(small)) text(27 15 "Pval:`:display%9.3f $pval'",size(small))

use "${working_data}temp", clear
graph bar (percent), over(Attracting_low2,  label(labsize(small))) $Options title("For sellers, attracting (also) bidders" "with low valuation to the auction is:",size(normal)) bar(1,fcolor(blue))  name(Fig4, replace)
split Bidders_incvaluatio, parse(",")
drop Bidders_incvaluatio
keep Bidders_incvaluatio*
gen obs=_n
reshape long Bidders_incvaluatio, i( obs) j(new)
keep if Bidders_incvaluatio!=""
replace Bidders_incvaluatio="1.Quasi-Endowment" if Bidders_incvaluatio=="The feeling of (almost) owning the property once at the auction"
replace Bidders_incvaluatio="3.Switch Cost" if Bidders_incvaluatio=="The cost of continuing the search if they lose"
replace Bidders_incvaluatio="2.Auction Fever" if Bidders_incvaluatio=="The heat of the moment and pleasure of winning the context"
replace Bidders_incvaluatio="5.Don't revise" if Bidders_incvaluatio=="Bidders never / very rarely revise their valuation"
replace Bidders_incvaluatio="4.Uncertainty" if Bidders_incvaluatio=="Uncertainty about the true value of the property"
replace Bidders_incvaluatio="6.Other" if Bidders_incvaluatio=="Other (specify below)"

graph bar (percent), over(Bidders_incvaluatio,  label(labsize(vsmall) angle(10))) bar(1,fcolor(blue))  $Options title("Select up to 2 factors you consider the most" "important in leading bidders to increase their"  "valuation during an auction",size(normal)) name(Fig3, replace)
global ToCombine
graph combine Fig2 Fig4 Fig1 Fig3  , cols(2) graphregion(fcolor(white)) graphregion(lcolor(white))  name(combined, replace)	
graph export "${results}Figure_10.png", replace


